package com.ruoyi.common.core;

import cn.hutool.db.GlobalDbConfig;
import cn.hutool.log.GlobalLogFactory;
import cn.hutool.log.dialect.slf4j.Slf4jLogFactory;
import cn.hutool.log.level.Level;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;

@Component
public class HutoolRunner implements ApplicationRunner {
    @Override
    public void run(ApplicationArguments args) throws Exception {
        GlobalLogFactory.set(Slf4jLogFactory.class);
        GlobalDbConfig.setShowSql(true, true, true, Level.INFO);
    }
}
